package reflect;

import java.lang.reflect.Method;
import java.lang.reflect.Modifier;

public class ReflectDemo6 {
    public static void main(String[] args) throws Exception {
        Class c=Class.forName("reflect.Person");
        Method method = c.getMethod("say",String.class,int.class);
        String name=method.getName();
        System.out.println(name);
        Class retType=method.getReturnType();
        System.out.println(retType);
        Class[] classes = method.getParameterTypes();
        for(Class e : classes)
        {
            System.out.println(e);
        }
        int count=method.getParameterCount();
        System.out.println(count);

        int mol= method.getModifiers();
        System.out.println(mol);
        switch (mol)
        {
            case Modifier.PUBLIC:
        }
    }
}
